3.12 \(\int \sin ^4(c+d x) (a+b \tan (c+d x)) \, dx\)

Optimal. Leaf size=83 \[ -\frac{\sin ^3(c+d x) \cos (c+d x) (a+b \tan (c+d x))}{4 d}-\frac{\sin (c+d x) \cos (c+d x) (3 a+4 b \tan (c+d x))}{8 d}+\frac{3 a x}{8}-\frac{b \log (\cos (c+d x))}{d} \]

[Out]

(3*a*x)/8 - (b*Log[Cos[c + d*x]])/d - (Cos[c + d*x]*Sin[c + d*x]^3*(a + b*Tan[c + d*x]))/(4*d) - (Cos[c + d*x]
*Sin[c + d*x]*(3*a + 4*b*Tan[c + d*x]))/(8*d)

________________________________________________________________________________________

Rubi [A]  time = 0.168075, antiderivative size = 83, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.21, Rules used = {819, 635, 203, 260} \[ -\frac{\sin ^3(c+d x) \cos (c+d x) (a+b \tan (c+d x))}{4 d}-\frac{\sin (c+d x) \cos (c+d x) (3 a+4 b \tan (c+d x))}{8 d}+\frac{3 a x}{8}-\frac{b \log (\cos (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Int[Sin[c + d*x]^4*(a + b*Tan[c + d*x]),x]

[Out]

(3*a*x)/8 - (b*Log[Cos[c + d*x]])/d - (Cos[c + d*x]*Sin[c + d*x]^3*(a + b*Tan[c + d*x]))/(4*d) - (Cos[c + d*x]
*Sin[c + d*x]*(3*a + 4*b*Tan[c + d*x]))/(8*d)

Rule 819

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[((d + e*x)^(
m - 1)*(a + c*x^2)^(p + 1)*(a*(e*f + d*g) - (c*d*f - a*e*g)*x))/(2*a*c*(p + 1)), x] - Dist[1/(2*a*c*(p + 1)),
Int[(d + e*x)^(m - 2)*(a + c*x^2)^(p + 1)*Simp[a*e*(e*f*(m - 1) + d*g*m) - c*d^2*f*(2*p + 3) + e*(a*e*g*m - c*
d*f*(m + 2*p + 2))*x, x], x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && LtQ[p, -1] && GtQ
[m, 1] && (EqQ[d, 0] || (EqQ[m, 2] && EqQ[p, -3] && RationalQ[a, c, d, e, f, g]) ||  !ILtQ[m + 2*p + 3, 0])

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rubi steps

\begin{align*} \int \sin ^4(c+d x) (a+b \tan (c+d x)) \, dx &=\frac{\operatorname{Subst}\left (\int \frac{x^4 (a+b x)}{\left (1+x^2\right )^3} \, dx,x,\tan (c+d x)\right )}{d}\\ &=-\frac{\cos (c+d x) \sin ^3(c+d x) (a+b \tan (c+d x))}{4 d}+\frac{\operatorname{Subst}\left (\int \frac{x^2 (3 a+4 b x)}{\left (1+x^2\right )^2} \, dx,x,\tan (c+d x)\right )}{4 d}\\ &=-\frac{\cos (c+d x) \sin ^3(c+d x) (a+b \tan (c+d x))}{4 d}-\frac{\cos (c+d x) \sin (c+d x) (3 a+4 b \tan (c+d x))}{8 d}+\frac{\operatorname{Subst}\left (\int \frac{3 a+8 b x}{1+x^2} \, dx,x,\tan (c+d x)\right )}{8 d}\\ &=-\frac{\cos (c+d x) \sin ^3(c+d x) (a+b \tan (c+d x))}{4 d}-\frac{\cos (c+d x) \sin (c+d x) (3 a+4 b \tan (c+d x))}{8 d}+\frac{(3 a) \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\tan (c+d x)\right )}{8 d}+\frac{b \operatorname{Subst}\left (\int \frac{x}{1+x^2} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac{3 a x}{8}-\frac{b \log (\cos (c+d x))}{d}-\frac{\cos (c+d x) \sin ^3(c+d x) (a+b \tan (c+d x))}{4 d}-\frac{\cos (c+d x) \sin (c+d x) (3 a+4 b \tan (c+d x))}{8 d}\\ \end{align*}

Mathematica [A]  time = 0.078587, size = 82, normalized size = 0.99 \[ \frac{3 a (c+d x)}{8 d}-\frac{a \sin (2 (c+d x))}{4 d}+\frac{a \sin (4 (c+d x))}{32 d}-\frac{b \left (\frac{1}{4} \cos ^4(c+d x)-\cos ^2(c+d x)+\log (\cos (c+d x))\right )}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[c + d*x]^4*(a + b*Tan[c + d*x]),x]

[Out]

(3*a*(c + d*x))/(8*d) - (b*(-Cos[c + d*x]^2 + Cos[c + d*x]^4/4 + Log[Cos[c + d*x]]))/d - (a*Sin[2*(c + d*x)])/
(4*d) + (a*Sin[4*(c + d*x)])/(32*d)

________________________________________________________________________________________

Maple [A]  time = 0.033, size = 92, normalized size = 1.1 \begin{align*} -{\frac{b \left ( \sin \left ( dx+c \right ) \right ) ^{4}}{4\,d}}-{\frac{b \left ( \sin \left ( dx+c \right ) \right ) ^{2}}{2\,d}}-{\frac{b\ln \left ( \cos \left ( dx+c \right ) \right ) }{d}}-{\frac{a\cos \left ( dx+c \right ) \left ( \sin \left ( dx+c \right ) \right ) ^{3}}{4\,d}}-{\frac{3\,a\sin \left ( dx+c \right ) \cos \left ( dx+c \right ) }{8\,d}}+{\frac{3\,ax}{8}}+{\frac{3\,ac}{8\,d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(d*x+c)^4*(a+b*tan(d*x+c)),x)

[Out]

-1/4/d*b*sin(d*x+c)^4-1/2/d*b*sin(d*x+c)^2-b*ln(cos(d*x+c))/d-1/4/d*a*cos(d*x+c)*sin(d*x+c)^3-3/8/d*a*sin(d*x+
c)*cos(d*x+c)+3/8*a*x+3/8/d*a*c

________________________________________________________________________________________

Maxima [A]  time = 2.15915, size = 117, normalized size = 1.41 \begin{align*} \frac{3 \,{\left (d x + c\right )} a + 4 \, b \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - \frac{5 \, a \tan \left (d x + c\right )^{3} - 8 \, b \tan \left (d x + c\right )^{2} + 3 \, a \tan \left (d x + c\right ) - 6 \, b}{\tan \left (d x + c\right )^{4} + 2 \, \tan \left (d x + c\right )^{2} + 1}}{8 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)^4*(a+b*tan(d*x+c)),x, algorithm="maxima")

[Out]

1/8*(3*(d*x + c)*a + 4*b*log(tan(d*x + c)^2 + 1) - (5*a*tan(d*x + c)^3 - 8*b*tan(d*x + c)^2 + 3*a*tan(d*x + c)
 - 6*b)/(tan(d*x + c)^4 + 2*tan(d*x + c)^2 + 1))/d

________________________________________________________________________________________

Fricas [A]  time = 2.35933, size = 189, normalized size = 2.28 \begin{align*} -\frac{2 \, b \cos \left (d x + c\right )^{4} - 3 \, a d x - 8 \, b \cos \left (d x + c\right )^{2} + 8 \, b \log \left (-\cos \left (d x + c\right )\right ) -{\left (2 \, a \cos \left (d x + c\right )^{3} - 5 \, a \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{8 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)^4*(a+b*tan(d*x+c)),x, algorithm="fricas")

[Out]

-1/8*(2*b*cos(d*x + c)^4 - 3*a*d*x - 8*b*cos(d*x + c)^2 + 8*b*log(-cos(d*x + c)) - (2*a*cos(d*x + c)^3 - 5*a*c
os(d*x + c))*sin(d*x + c))/d

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \tan{\left (c + d x \right )}\right ) \sin ^{4}{\left (c + d x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)**4*(a+b*tan(d*x+c)),x)

[Out]

Integral((a + b*tan(c + d*x))*sin(c + d*x)**4, x)

________________________________________________________________________________________

Giac [B]  time = 1.69996, size = 1439, normalized size = 17.34 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)^4*(a+b*tan(d*x+c)),x, algorithm="giac")

[Out]

1/32*(12*a*d*x*tan(d*x)^4*tan(c)^4 - 16*b*log(4*(tan(c)^2 + 1)/(tan(d*x)^4*tan(c)^2 - 2*tan(d*x)^3*tan(c) + ta
n(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*tan(d*x)*tan(c) + 1))*tan(d*x)^4*tan(c)^4 + 24*a*d*x*tan(d*x)^4*tan(c)^2 +
24*a*d*x*tan(d*x)^2*tan(c)^4 + 11*b*tan(d*x)^4*tan(c)^4 - 32*b*log(4*(tan(c)^2 + 1)/(tan(d*x)^4*tan(c)^2 - 2*t
an(d*x)^3*tan(c) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*tan(d*x)*tan(c) + 1))*tan(d*x)^4*tan(c)^2 + 12*a*tan(d
*x)^4*tan(c)^3 - 32*b*log(4*(tan(c)^2 + 1)/(tan(d*x)^4*tan(c)^2 - 2*tan(d*x)^3*tan(c) + tan(d*x)^2*tan(c)^2 +
tan(d*x)^2 - 2*tan(d*x)*tan(c) + 1))*tan(d*x)^2*tan(c)^4 + 12*a*tan(d*x)^3*tan(c)^4 + 12*a*d*x*tan(d*x)^4 + 48
*a*d*x*tan(d*x)^2*tan(c)^2 + 6*b*tan(d*x)^4*tan(c)^2 - 32*b*tan(d*x)^3*tan(c)^3 + 12*a*d*x*tan(c)^4 + 6*b*tan(
d*x)^2*tan(c)^4 - 16*b*log(4*(tan(c)^2 + 1)/(tan(d*x)^4*tan(c)^2 - 2*tan(d*x)^3*tan(c) + tan(d*x)^2*tan(c)^2 +
 tan(d*x)^2 - 2*tan(d*x)*tan(c) + 1))*tan(d*x)^4 + 20*a*tan(d*x)^4*tan(c) - 64*b*log(4*(tan(c)^2 + 1)/(tan(d*x
)^4*tan(c)^2 - 2*tan(d*x)^3*tan(c) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*tan(d*x)*tan(c) + 1))*tan(d*x)^2*tan
(c)^2 + 24*a*tan(d*x)^3*tan(c)^2 + 24*a*tan(d*x)^2*tan(c)^3 - 16*b*log(4*(tan(c)^2 + 1)/(tan(d*x)^4*tan(c)^2 -
 2*tan(d*x)^3*tan(c) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*tan(d*x)*tan(c) + 1))*tan(c)^4 + 20*a*tan(d*x)*tan
(c)^4 + 24*a*d*x*tan(d*x)^2 - 13*b*tan(d*x)^4 - 64*b*tan(d*x)^3*tan(c) + 24*a*d*x*tan(c)^2 - 36*b*tan(d*x)^2*t
an(c)^2 - 64*b*tan(d*x)*tan(c)^3 - 13*b*tan(c)^4 - 32*b*log(4*(tan(c)^2 + 1)/(tan(d*x)^4*tan(c)^2 - 2*tan(d*x)
^3*tan(c) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*tan(d*x)*tan(c) + 1))*tan(d*x)^2 - 20*a*tan(d*x)^3 - 24*a*tan
(d*x)^2*tan(c) - 32*b*log(4*(tan(c)^2 + 1)/(tan(d*x)^4*tan(c)^2 - 2*tan(d*x)^3*tan(c) + tan(d*x)^2*tan(c)^2 +
tan(d*x)^2 - 2*tan(d*x)*tan(c) + 1))*tan(c)^2 - 24*a*tan(d*x)*tan(c)^2 - 20*a*tan(c)^3 + 12*a*d*x + 6*b*tan(d*
x)^2 - 32*b*tan(d*x)*tan(c) + 6*b*tan(c)^2 - 16*b*log(4*(tan(c)^2 + 1)/(tan(d*x)^4*tan(c)^2 - 2*tan(d*x)^3*tan
(c) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*tan(d*x)*tan(c) + 1)) - 12*a*tan(d*x) - 12*a*tan(c) + 11*b)/(d*tan(
d*x)^4*tan(c)^4 + 2*d*tan(d*x)^4*tan(c)^2 + 2*d*tan(d*x)^2*tan(c)^4 + d*tan(d*x)^4 + 4*d*tan(d*x)^2*tan(c)^2 +
 d*tan(c)^4 + 2*d*tan(d*x)^2 + 2*d*tan(c)^2 + d)